"use strict"

/**
 * 鸡西市采购网爬虫
 *  
 */

var Base = require("./base");
var jx_spider = new Base();
jx_spider.name = "鸡西市采购网";
jx_spider.encode = "GBK";
jx_spider.enabled = false;

jx_spider.getPageUrl = function(pg) {
    var url = "http://www.hljcg.gov.cn/xwzs!queryXwxxqx.action?lbbh=42303&xwzsPage.pageNo=" + pg + "&xwzsPage.pageSize=20&xwzsPage.pageCount=67&xwzsPage.LBBH=42303";
    return "http://www.hljcg.gov.cn/xwzs!queryXwxxqx.action?lbbh=42303&xwzsPage.pageNo=" + pg + "&xwzsPage.pageSize=20&xwzsPage.pageCount=67&xwzsPage.LBBH=42303";

};

jx_spider.getItems = function($) {
    var items = [];
    $(".lbej").each(function(index, ele) {
        var e = $(ele);
        var item = {};
        item.title = e.attr("title");
        item.url = e.attr("onclick");
        console.log(item.url);
        item.source = jx_spider.name;
        items.push(item);
    });
    return items;
};

exports = module.exports = jx_spider;